Bernie ][ The Rescue 2.6

Storage

Registering | Getting Started | Audio/Video | Storage
Communications | Printing | Preferences

Bernie Home | F.E.Systems Home

1. Introduction

2. Real, Virtual And Shared Disks

> 2.1 The SuperDrive

> 2.2 Virtual Disks

> > 2.2.1 Creating a Virtual Disk

> > 2.2.2 Automatic Disk Initialization

> > 2.2.3 Mounting Disk Images

> > 2.2.4 Mounting Multiple Disk Images With pre-MacOS 8.5

> > 2.2.5 Aliases Of Disk Images

> 2.3 Shared Volumes

> > 2.3.1 Sharing a Disk With MacOS 8.5

> > 2.3.2 Sharing a Disk With MacOS 8.1 Or Earlier

> > 2.3.3 Read-Only or Read/Write Access?

> > 2.3.4 Aliases Of Volumes

3. The CleverPort Interface

> 3.1 The Disks Window

> > 3.1.1 The Built-In SuperDrive: Mounting a 3.5" Disk

> > 3.1.2 Mounting A Disk Image

> > 3.1.3 Mounting Disks & Volumes By Drag & Drop

> > 3.1.4 Mounting a Recently Used Disk Image or Volume

> > 3.1.5 Selecting/Deselecting a Drive

> > 3.1.6 Ejecting a Disk

> > 3.1.7 Locking/Write-Protecting a Disk

> > 3.1.8 Rearranging the Device Chain

> 3.2 Booting With CleverPort

> > 3.2.1 Manually Adjusting Boot Order

> 3.3 Declaring Default Startup Disks

4. Intricate Whirl Machine IWM

> 4.1 Enabling IWM Emulation

> 4.2 Drive Mapping

> > 4.2.1 How And When Drives Are Mapped

> 4.3 Technical Differences IWM / CleverPort

> 4.4 Copy Protection

> 4.5 Zero Memory Footprint Caching

5. 5.25" Floppy Disks

> 5.1. 5.25" Basics

> 5.2. ProDOS or DOS 3.3 Formatted?

> 5.3. Disk Images Recognized by Bernie

> 5.4. Additional Technical Information

6. CataDog™ File Browsing NEW

> 6.1 Cataloging a Disk

> 6.2 Browsing By File Type

#

#

1. Introduction

Emulators have a problem - they are emulating a particular machine in software but do not have access to the peripherals the software is expecting. Thus, emulators such as Bernie ][ The Rescue have to find alternate ways for retrieving and storing information.

Luckily, the Apple IIgs and Macintosh share many hardware components, and Bernie does a good job of bridging technical differences. This chapter explains how Bernie can work with your software archive via the built-in disk drive (hereafter referred to as the "SuperDrive"), shared volumes and disk images.

### Overview

The chapter 2 in this document describes the different types of "disks" (physical disks, virtual disks, shared volumes), how you can create a new virtual disk, share a volume and what disk formats are supported.

Next, we'll elaborate on the Cleverport interface, a custom disk controller that is fast, flexible and gets the job done. About 95% of Apple IIgs software is compatible with the Cleverport. It does not emulate the underlying hardware but rather intercepts calls to the Firmware. The advantage is that this is really fast and proven. Cleverport has been part of Bernie since its introduction and is the default "disk environment".

The fourth chapter describes the Intricate Whirl Machine (IWM) that substitutes Cleverport. The Intricate Whirl Machine is emulating Apple IIgs disk hardware on the lowest possible level and allows you to run those very rare titles that refuse to work with the Cleverport. The IWM requires some technical understanding (notably how drives are mapped), but it's operating transparently and hides its technical nature from the user. We recommend you to stick with Cleverport unless you want to run some software where IWM emulation is mandatory.

The fifth section discusses support for 5.25" disk images, i.e. what images are supported and how you can manage them.

Another chapter in a separate document explains disk preferences, a real time-saver for advanced Bernie users. Disk preferences allow you to define certain settings for individual disk images and activate them when booting from them.

### Getting Help

If you have questions regarding storage, feel free to go to the Feedback page and submit us your question or comment.

#

#

2. Real, Virtual And Shared Disks

Bernie supports a variety of disk formats, from physical 3.5" disks to volumes that appear on your Mac desktop. For each type there's a lot of information to share with you, so let's start. The following subchapters discuss each disk type.

##

2.1 The SuperDrive

A wonderful thing is that Macs and IIgs computers have the same 3.5" disk drive in common. This enables Bernie to read disks that were created on a IIgs.

Bernie is compatible with HFS, ProDOS (GS/OS) and MS-DOS disks. It can read from and write to physical 3.5" disks. Bernie does not require PC Exchange or File Exchange (MacOS 8.5) for reading ProDOS disks.

##

2.2 Virtual Disks

Virtual disks seem to be a confusing concept for users new to emulators. Understanding how virtual disks (or disk images) work is essential because they offer unique advantages.

A virtual disk is a file on one of your Mac volumes that appears as a disk in the emulated Apple II. Apple II software is seeing this disk as a disk inserted into a storage peripheral because the emulator mimics the hardware of such a drive. In reality, Bernie intercepts read/write commands to this virtual device and translates them into read/write commands to a file on a Mac volume. Thus, all accesses to this drive are affecting the Macintosh file. The files are therefore called "disk images" or "virtual disks".

As with real disks, disk images have to be inserted and ejected. Instead of "inserting" disks, making a disk image available is referred to as mounting a disk image.

Disk images can be of almost any size and come in different flavors, i.e. formats. Bernie supports different formats. Except for the Universal Disk Format (also referred to as "2IMG" format), none of them offers a particular advantage over others. They are supported because these already exist or because they can be further used with other tools such as disk copiers. Bernie supports:

- "DiskCopy" : Disk Copy is a popular disk copier from Apple Computer. You can turn "real" 3.5" disks into disk images using Disk Copy and directly use the resulting disk image with Bernie. Bernie supports DiskCopy 4.2 and DiskCopy 6 images, except for DiskCopy 6 compressed images. They will not work.
- "Universal Disk Image" (2IMG): There's a new disk image format that will work with most regularly updated emulators across all platforms. Bernie can create, read and write such images. These images can also contain emulator-specific enhancements and user comments, though these features are not yet supported by Bernie. For compatibility reason, we recommend you to use this type.
- "Hard Disk Image": A less popular disk image. You will hardly use it, but it's nice to know Bernie can deal with it.
- "Raw Data Image": A disk image format that does not have a header. It's merely a collection of disk blocks.

Bernie also supports 5.25" disk images:

- ProDOS-order: disk images with a ".po" suffix have been formatted with ProDOS or GS/OS.
- DOS-order: disk images with a ".do" suffix have been formatted with DOS 3.3.
- Nibblized Data: disk images with a ".nib" suffix.

###

2.2.1 Creating a Virtual Disk

Creating a virtual disk is as simple as saving a file. To create a new image, follow these steps:

This screen shot was taken with MacOS 8.5. Your screen may vary with older versions of MacOS.

1. open the File menu and choose "Create New Disk..."
2. choose a disk image format, preferably "Universal Disk Image"
3. choose a size
4. give the new image a name and save it to a Macintosh volume

Done!

####

2.2.2 Automatic Initialization

Disk images created within Bernie using the "Create Disk.." command are initialized automatically with ProDOS®. This means you can create a disk image and it will be recognized immediately. It is not possible to initialize disk images with DOS 3.3®.

####

2.2.3 Mounting Disk Images

To mount a disk image, choose the "Mount Disk.." item from the "File" menu. This opens a standard file dialog where you can pick your disk images.

Please note that there're a number of shortcuts that simplify disk mounting significantly. These shortcuts - drag & drop mounting, recently mounted disks list, and the Disks' window button bar - are explained thoroughly in chapter 3.

####

2.2.4 Mounting Multiple Disk Images With MacOS 8.1 or Earlier

With Bernie, you can put disk images that somehow belong together into folders and mount them all at once. To do this, click again the Mount button in the Disks window or choose "Mount Disk.." from the File menu. A dialog box appears:

In the illustration above, a folder has been highlighted. By pushing the Accept button, you tell Bernie to mount everything in that folder.

Please note the stress on "everything". Since disk images often have invalid file types (due to downloading etc.), Bernie really tries very hard to mount as much as possible. If you have other files in a folder, Bernie would look into each file and display an error message for each file that is not a disk image. Thus, please mount only folders that only contain those disk images you want to mount.

Besides mounting each file, Bernie will also verify if each disk image has the proper type. If not, it "auto-types" disk images so they will show up properly the next time. This is all done automagically in the background.

####

2.2.5 Aliases Of Disk Images

Bernie properly resolves aliases to disk images. You might want to use aliases for creating worksets - folders with disk images belonging together while keeping the original disk images in their place. For example, you could store aliases of a GS/OS system disk and your favorite GS/OS application in one directory.

##

2.3 Shared Volumes

Volume Sharing basically means that you can mount any volume seen in the Finder also in the Apple II environment. This applies to ProDOS volumes (mounted with PC Exchange or other third party tools), HFS volumes (MacOS), MS-DOS volumes and CD-ROMs. You can only mount the first session of a multisession CD-ROM.

Volume sharing has one pretty steep requirement - the volume you'd like to share must appear on the Mac desktop first. While this doesn't sound too difficult, it often is because ProDOS support on the Mac is a rather dark chapter. Here's a short summary which tools might help you:

- PC Exchange is the best choice if you are owning an original Apple hard disk with standard Apple partitioning. If you are using third-party drives or have reformatted your hard disk for use with RAMFast, PC Exchange won't work.
- FWB's Hard Disk Toolkit is a killer SCSI toolkit for techies. It's complicated but incredibly powerful. You can mount ProDOS volumes with great success. Unfortunately, FWB nuked ProDOS support in version 2.x, but even recent versions reportedly still feature ProDOS support (though FWB is denying it.) There're some caveats with FWB's Hard Disk Toolkit - see next section.
- SilverLining Light let's you mount certain ProDOS partitions, too. It's an utility from La Cie Inc.
- Apple's Drive Setup utility also has a Mount option but refuses to work with non-Apple drives. Still, you can patch Drive Setup to work with other drives as well.

The SilverLining and Drive Setup options have been suggested on the Bernie mailing list - you might want to join the list for more information.

Volume sharing frees you from moving your data - for example from your former Apple II hard disk - to a virtual volume via 3.5" disks. You can access all data on a volume (some file system specific restrictions may apply) - easily and at pretty high transfer rates.

####

2.3.1 Sharing a Disk With MacOS 8.5

1. choose "Share Disk..." from the File menu
2. highlight a volume
3. push the "Choose" button

####

2.3.2 Sharing a Disk With MacOS 8.1 Or Earlier

1. choose "Mount Disk.." from the File menu
2. push the "Desktop" button to see a list of all available volumes
3. highlight a volume
4. set the check box "read-only" the the appropriate setting (see below)
5. click the button at the bottom that says "Mount <volume>" where <volume> is the name of the volume you selected.

Important: you can't share the startup volume. If you select the startup volume, the Mount button will be dimmed.

###

| Tidbit If you are familiar with ShrinkWrap, volume sharing can be an incredibly useful tool for transferring data even if you only have a single disk attached to your Mac. With ShrinkWrap you can create disk images that mount just like real disks on the Mac desktop. You can copy data onto it and then tell Bernie to share the disk. Works like a charm. To do so, launch ShrinkWarp (currently at version 3). Then choose the command "New Image" from the "Image" menu and create a new disk. ShrinkWrap will mount the image automatically so you can start using it immediately. When you're done, go to Bernie and choose "Mount Disk.." or "Share Disk..." from the "File" menu. Share the disk as outlined above.

####

2.3.3 Read-Only or Read/Write Access ?

Below the Mount button is a checkbox titled "read-only". It is checked by default. This checkbox allows you to mount a volume in two completely different ways - it's not just that write access is enabled or not, instead there are some major differences in how the volume is mirrored in the Apple II environment.

If read-only is checked, the volume appears in the Apple II environment as a write protected Smartport device. Simultaneously, Bernie places a lock on the volume in the MacOS layer, thus preventing any modifications. (You will see a "lock" in the Finder windows.) Consequently, you have read-only access from both MacOS and the Apple II. When you unmount the volume in Bernie, the lock will be removed and you can read and write again from within MacOS. (Note: the Finder does not automatically update the Finder windows. Therefore, you might still see the disk lock even though it has been removed. Please close the Finder windows and reopen them to see the changes.)

If read-only is cleared, the volume will be removed from the desktop and Bernie is taking over control. Although this seems to be much cooler than read-only access, there are some important pitfalls you should be aware of:

Some FWB Hard Disk Toolkit (HDT) drivers are incompatible with volume sharing. This is a deficiency of the HDT driver. We have found that all HDT drivers do not work on removable media with the "physical eject on unmount" flag checked. (This flag is in the HDT driver configuration. Please consult the manual for more details.) There are two workarounds: either disable "physical eject on unmount" or use a different driver. HDT versions prior to v2.0 do not implement certain driver calls properly. You will not be able to use volume sharing with HDT versions predating 2.0 (whether the media is removable or not). This information applies to you only if you are using the "Hard Disk Toolkit" software from FWB Inc. Be very careful with HFS volumes. Even though GS/OS can access HFS volumes, the HFS driver in GS/OS is known to be very buggy and can corrupt a volume effortlessly. There are patches that fix some of the most annoying quirks, but you still risk loss of data. We recommend you to use HFS volumes only with dependable media or in read-only mode. In read-only mode data on the shared disk can't be modified and you're on the safe side. While the volume is controlled by Bernie in write-enabled mode, MacOS does not claim the volume is in use. Consequently, you could eject removable media easily and nobody would complain. DO NOT EJECT THE MEDIA. Instead, follow these steps: shut down GS/OS or ProDOS 16 so all open buffers/caches are written to disk unmount the volume in Bernie (push the "Eject" button) the volume will reappear in the Finder. Drag it to the Trash.

As you can see, sharing a volume in read/write mode does not come for free. We have implemented the read-only mode for those who do not want to risk loss or corruption of data caused by components that are not necessarily under Bernie's control. After all, read-only mode is perfect for transferring huge volumes of data. Better safe than sorry!

####

2.3.4 Aliases Of Volumes

With Bernie, you can make aliases of volumes and mount the alias. Bernie will resolve the alias and share the volume.

Because volumes can be shared read-only or with full read/write access, the function of aliases has been extended:

- if an alias is locked, the volume it is pointing at will be shared read-only
- if an alias is not locked, the volume will be shared read/write

Please keep in mind that sharing HFS volumes with full read/write access is not recommended.

#

3. The CleverPort™ Interface

The CleverPort is Bernie's proprietary disk interface. It's a substitute for SmartPort, a technology built into Apple IIgs computers. The SmartPort serves as a not-so-low-level interface for exchanging data in blocks of 512 bytes per transaction. CleverPort intercepts and interprets these command sent through the Smartport interface.

CleverPort emulates an imaginary device chain of up to 8 devices. Each device can hold one disk of virtually any size. It works with "real" 3.5" disks, virtual disks and shared disks equally well.

For the sake of simplicity, please make sure the menu item "Low-Level Disk Support" in the Setup menu is disabled while working through this chapter. The exact function of this flag is explained in a more technical chapter about the "Intricate Whirl Machine IWM". Basically, you have the choice between running Bernie with CleverPort or with IWM emulation - they are mutually exclusive. But the question remains:

When Should I Use CleverPort? Always use CleverPort except with very few software titles that refuse to work with it. These include some GS/OS 4.0 disks and some self-booting demos. Almost all programs written with just the slightest intention of compatibility are compatible with CleverPort. CleverPort is faster and supports a much wider range of disk capacities than IWM emulation.

##

3.1 The Disks Window

The Disks window gives you control over the imaginary device chain. Upon launching Bernie, it looks more or less like the figure below:

####

3.1.1 The Built-In SuperDrive: Mounting a 3.5" Disk

The window contains only one device (drive) that is labeled "built-in SuperDrive" and resides at ID 2. A chain may contain devices from 1 to 8 - in this case we only have this single device.

This particular drive is actually an exception because it is always mounted and visible. Whenever you stick a disk into your Mac's 3.5" disk drive, the disk you have inserted will be mapped to this unit. Analogously, if you'd like to eject a disk in the built-in 3.5" drive, you only need to tell Bernie to eject the media in the drive titled "built-in SuperDrive".

####

3.1.2 Mounting A Disk Image

Usually, you won't use real 3.5" disks that often because they are rather slow compared to disk images. Also, you can have only one single 3.5" disk online which restricts usage.

What you need is a drive that is loaded with a virtual disk. To mount a disk image, push the "Mount" button at the bottom and pick a disk image. (To learn more about how to create a new disk image, please turn to the chapter "Creating a Virtual Disk".) For the sole purpose of demoing how the window will look like, assume we have mounted a really large disk image titled "Games":

Bernie has created a device for this new image and mapped it to unit #1. Bernie will always map a new image to the lowest-numbered free unit. Next to the drive icon you can see the disk image's name ("Games"), it's size and what kind of disk image it is. In the example above, Games is huge disk image with 32 Mb worth of data. If we mounted more images, the window would grow in the following way:

(Please ignore the small "I" and "II" boxes. Their use will be explained in chapter 4.)

###

3.1.3 Mounting Disks & Volumes By Drag & Drop

Picking disk images and volumes from standard "File Open" dialog boxes can be tedious. That's why Bernie allows you to grab disk images from the Finder and drop them onto the Disks window:

- locate a disk image, volume icon or alias
- click it and hold down the mouse button
- drag the icon to the Disks window
- while the cursor is on top of the Disks window, you will notice a very faint blue border
- release the mouse button

When mounting volumes that way (i.e. when sharing volumes by drag&dropping their icon), the volume will always be mounted in read/write mode.

###

###

3.1.4 Mounting a Recently Used Disk Image or Volume

Bernie keeps track of the last few mounted disk images and shared volumes. To see a list of recently used disks...

- open the File menu and select a disk from the "Mount Recent" submenu
- in the Disks window, push the Mount button and hold down the mouse button until a popup menu appears

hold down the "Mount" button for a
popup menu of recently used disks

###

3.1.5 Selecting/Deselecting a Drive

Suppose you want to do something particular with a disk image such as locking it, ejecting it, or whatever. To select a target device for these actions, click once on a device so that it becomes highlighted:

If there's a selected device, all of the buttons at the bottom are active.

To deselect it, click it again.

###

3.1.6 Ejecting a Disk

Unlike Mac 3.5" drives, 3.5" drives for the IIgs feature a "manual eject" button for ejecting disks. So does Bernie.

Before further elaborating on how to manually eject a disk, let's start with a very important warning. Ejecting a disk makes the volume unavailable. If, for example, you are ejecting a disk while Apple II software is still writing to a disk or has still buffers to be flushed, the ejected disk may be severely corrupted because not all data could be written to disk. To prevent corruption, please keep this in your mind:

- if possible, always let the system software eject a disk. For example, when you're in the Finder move the disk to the trash.
- if you are not sure if all caches have been flushed, quit the current application or shut down the virtual IIgs properly

Basically, Bernie does not introduce any additional "catches". These rules are valid on any system with removable media.

Actually, there are four different ways of how to manually eject a disk. Each works equally well:

- select a drive, then push the green EJECT button at the bottom of the Disks window
- each drive has its own eject button. Push to the right of the disk slot to eject a disk.

- open the Setup menu and the Eject Disk... submenu. You can either
  - choose Eject More to select multiple disks and eject them at once
  - choose a particular drive, identified by its unit ID

###

3.1.7 Locking/Write-Protecting a Disk

Bernie also allows you to "soft-lock" a disk image. The image is not physically locked, but Bernie pretends it is. Apple II software is unable to modify the content of software that operates on a disk (image) with a soft-lock.

Note: in some situations a disk is always locked, and you can't do anything about that. This happens when you are mounting disk images who have been locked in the MacOS Finder, or shared volumes in read-only mode.

To lock a disk, do this:

- select a target drive
- push the green LOCK button at the bottom of the Disks window

###

3.1.8 Rearranging the Device Chain

Up to now you have seen how to mount additional disks by using the Mount function. New disks have been added by creating a new drive at the lowest-numbered free slot. It is possible, however, that you'd like to mount a disk at another ID. For example, the unit ID is indirectly determining from which volume will be booted and at which slot/drive combination a disk resides. (More about booting under Cleverport in the next chapter.)

To move a disk to a new (free) unit, follow these steps:

- select a target drive
- push the up or down arrow buttons to move the drive to the next higher or lower free unit

(Note: the arrow buttons are at the bottom of the Disks window. The arrow keys on the keyboard do not work here.)

Note that the arrow keys move a drive only from one free unit ID to the next. Example:

In this example, drive #1 hopped to the next higher free unit which is unit 3. ( If you pushed the up arrow again, it would hop on to unit 6.)

Warning: remapping a drive may severely confuse the system software. Furthermore, if there are still disk caches with data not written to disk, the disk image may become corrupted. We strongly recommend you to remap devices only during startup, after shutdown, or while working with ProDOS 8. For the system, remapping is basically the same as ejecting a disk, so the same warnings apply here.

##

3.2 Booting With CleverPort

When Bernie reboots with CleverPort enabled, it first determines which drive to boot from. It does this by first inspecting the unit #1, and if this drive does not contain a bootable disk or is empty, advances to unit 2 and so on. Once it finds a bootable disk, it moves it down to unit 1 because this is the drive Bernie does always boot from. In case unit 1 was already occupied by a non-bootable disk, Bernie simply swaps unit 1 with the first bootable disk.

Consider this situation:

When you boot Bernie with CleverPort, it first checks units 1 and 2. Since both units are empty, Bernie proceeds with unit 3 where it finds a bootable disk ("Sword of Sodan" - don't ask for it, it's only the demo version :-) .) Hence, it moves "Sword of Sodan" down to unit 1 and boots from it.

(If there were another disk at unit 1, Bernie would have moved it to unit 3.)

###

3.2.1 Manually Adjusting Boot Order

With this knowledge you can choose any boot order you wish. Just make sure the disk you want to boot from is the first bootable disk in the device chain. It needs not be at unit 1 but may not be preceded by another bootable disk.

For example, if you'd like to boot from the volume "Games" in the right illustration above, you would have to move "Sword of Sodan" one place up (to unit 3) and move "Games" down to unit 1.

Here a brainteaser for techies: you could also move "Games" down to unit 3 first and then move "Sword of Sodan" up. "Sword of Sodan" would then be reassigned to unit 6. Bernie would still see "Games" as the first bootable device and move it to unit 1 automatically. Hooray!

##

3.3 Declaring Default Startup Disks

After spending some time Bernie, you will eventually find that you are mounting the same boot disk with every new Bernie session. Luckily, you can tell Bernie to automatically mount one or several disk images every time Bernie is started.

When opening the Preferences window and choosing the "Storage" panel, you'll find a box where you can define your startup disks. To pick your startup disks, push the button "Select Startup Disk or Folder".

As with mounting disk images, you may choose to either pick a single disk image or an entire folder. For more information please turn to "Mounting Multiple Images". (This also applies to MacOS 8.5 and later.)

Lastly, the checkbox "Don't mount when starting with a disk image" deserves an explanation. It is possible to start Bernie by dropping a disk image onto Bernie's application icon, or by double-clicking it. The latter is probably the way you're usually starting Bernie.

When starting Bernie with a disk image, you can tell Bernie whether you would like to load any startup disks plus the disk images you dropped onto the Bernie icon or just those you dropped. For example, if your startup disk is a GS/OS start disk and you're dropping your favorite, self-booting game onto the Bernie icon, you might not want to have the startup disk loaded. In other situations it might be still appropriate. This checkbox lets you configure Bernie to your requirements.

#

4. Intricate Whirl Machine IWM

Recent releases of Bernie feature IWM emulation for compatibility with very hardware-dependent software. These software titles "talk" directly to the hardware and require highly accurate emulation. IWM emulation replaces CleverPort, Bernie's proprietary disk controller that has been discussed in chapter 3.

When Should I Use IWM emulation? IWM emulation has been streamlined to work with very hardware-specific software. It does not offer the flexibility and speed of CleverPort. However, it enables you to run software from the FTA and improves compatibility with copy-protected software (see below for more information).

Bernie's IWM emulation mimics the availability of the original disk controller in every Apple IIgs. Currently, IWM emulation is limited to up to two 3.5" drives that each can hold one disk of 800kB capacity.

Note: IWM emulation outlaws disks with capacities other than 800kB. This means that you can only use software that comes on 800kB disks or disk images. Although you can still mount disks of any size, Bernie will ignore anything but 800kB disks while being in IWM emulation.

##

4.1 Enabling IWM Emulation

To enable IWM emulation, you have two possibilities

- choose Low-Level Emulation from the Setup menu
- in the Apple IIgs control panel, set Slot 5 to "Smart Port"

While choosing a simple menu command is rather straightforward, the latter point needs to be elaborated. The Apple IIgs offers a group of control panels that are either accessed by pushing Command-Control-Escape or by selecting "Control Panels" from the Apple menu. In either case, there's a "Slots" panel for configuring the slots in a Apple IIgs. Each slot can either take over a built-in function or activate the (external) card it is holding. In Bernie, this concept is used to switch between Cleverport (our proprietary disk controller) and IWM emulation, the built-in disk controller. Assuming that you have opened the Classic Control panels (push Command-Control-Escape) and opened the Slots panel, you will see a screen like the one below:

If slot 5 is set to "Smart Port", IWM emulation is active. | If slot 5 is set to "Your Card", Bernie's proprietary CleverPort interface is active.

Note: switching from IWM emulation to CleverPort or vice versa involves rebooting your virtual Apple II. You can change the settings any time but they won't take effect until you reboot

If you are unsure whether IWM emulation or Cleverport is active, just have a look at the Disks window. The title bar indicates which component is currently running:

IWM emulation is active | IWM emulation is inactive

In order to facilitate switching from IWM to CleverPort, Bernie now automatically enables CleverPort when there's no bootable 3.5" disk mounted.

##

4.2 Drive Mapping

As you have eventually noticed in the chapter about CleverPort, the device chain displayed in the Disks window sometimes contains small tags that look like this:

As noted earlier, IWM emulation is restricted to 2 3.5" drives. The Disks window, however, allows you to mount up to 8 disks of any size. Bernie thus has to find two disks in the device chain that are compatible with IWM emulation. The two drives that meet this criteria are marked with a "I" and "II" respectively.

###

4.2.1 How And When Drives Are Mapped

Bernie reassigns drive for IWM use on two occasions:

- when you reboot Bernie, it scans the device chain and maps the first two drives with 800kB media to IWM unit I and unit II
- when you mount a new disk image and IWM unit I or unit II are not mapped (for example because you previously ejected the disk in IWM unit I), the drive with the new disk image will become one of the undefined IWM units.

Note that Bernie tries hard to stay in synch with software that may be still accessing an IWM-mapped drive. For example, when you are using the arrow buttons to move a drive to a new position in the device chain, Bernie will also move the IWM mapping. An IWM mapping is only invalidated when you actually eject the media or reboot Bernie.

##

4.3 Technical Differences IWM / CleverPort

Software using IWM emulation transmits and receives data byte-by-byte. (The CleverPort, on the other hand, communicates on block level which equals 512 bytes per transaction.) Consequently, IWM emulation is much slower than CleverPort. Luckily, we have highly optimized IWM emulation in Bernie so you won't notice a tremendous performance hit. Nevertheless, CleverPort is still faster and more flexible.

##

4.4 Copy Protection

Copy protection often manipulates disk bytes in a nonstandard way. This can go as far as formatting a disk as a spiral. It's therefore up to the software to read a protected disk and reconstruct the original data.

Although Bernie does feature low-level disk emulation, there's a big catch which basically neutralizes the inherent advantages of low-level emulation. Think about how disks are read into memory: First, you insert a protected 3.5" disk into the built-in disk drive. Bernie then attempts to read from this disk. This read operation tells your Mac to transfer a few disk blocks from the media into memory and translating the encoded disk bytes (disk bytes are encoded in a rather complicated way) into regular blocks of 512 bytes each. If all goes well, Bernie translates the 512 byte blocks back into encoded disk bytes and feeds them into the Apple II software, byte-by-byte. The point is that although the Apple II software will only see the encoded disk bytes, all data on a disk will first have to go through a decoding and encoding stage because the Mac can't be told to just retrieve the raw data as it comes in. The Mac always attempts to decode whatever it finds, and the Mac does not know about Apple II copy protection.

Put briefly, the fact that the Mac has the first shot on the protected disk prevents Bernie from running some copy-protected software because the Mac wants to decode disk bytes and expects to find data that is encoded in a standard way. If there's a copy protection that, the Mac will be unable to figure out what's on the disk and reports an error.

##

4.5 Zero Memory Footprint Caching

Zero Memory Footprint Caching is a dynamic caching algorithm that speeds up disk access with IWM emulation, especially when used in conjunction with slow peripherals. For instance, Bernie's caching tremendously speeds up transfer rates with physical 3.5" disks.

Zero Memory Footprint means that you need not allocate a disk cache or increase Bernie's application size in order to accommodate space for disk caches. Instead, Bernie configures and sizes its cache automatically and transparently without decreasing memory available for IIgs memory or other functions. Bernie maintains two separate write-through caches (one for each IWM drive) with average cache hits of between 20 and 30% (ballpark).

#

5. 5.25" Floppy Disks

Before 3.5" disks appeared in the mid 80ies, 5.25" floppy disks were the de facto standard in "mass media". Today, floppy disks are no longer used, but if you'd like to enjoy the hundreds of classic games and other, early milestones in Apple II computing, then they will most likely come on 5.25" disks.

5.25" support in Bernie is somewhat limited. It has been designed to enable you to run all those classic games like Choplifter, Hard Hat Mack, etc. Bernie's 5.25" implementation is not currently compatible with GS/OS. We are working on that.

Important: you can't format 5.25" disk images due to technical limitations.

##

5.1 5.25" Basics

Although hardware is radically different, Bernie ][ The Rescue integrates 5.25", 3.5" and SmartPort devices seamlessly in one device chain. You have become familiar with the "Disks" window in chapter 3, and 5.25" floppy disks are also displayed in the same window:

device chain with one 5.25" disk image | device chain with two 5.25" disk images

(for more information on the "P" icon, please turn to chapter "Disk Preferences".)

5.25" units do always appear at the top of the device chain

Bernie reserves two logical units right above the regular CleverPort units 1 through 8 for floppy disks. The two drives represents drive 1 and drive 2 of an imaginary 5.25" disk controller in slot 6.

you can't move a CleverPort unit into the 5.25" area and vice versa

A CleverPort device can only be used with the CleverPort or, in case of 800kB disks, IWM emulation. Similarly, 5.25" floppy disks require a different "kind" of hardware emulation and thus can't be used with CleverPort or IWM emulation. The arrow buttons only work within the CleverPort/IWM area and within the 5.25" area.

you can move 5.25" disks from drive 1 to drive 2 and vice versa

However, you can still use the arrow buttons in the "Disks" window to move a floppy disk in drive 1 to drive 2 on condition that drive 2 is empty. Analogously, a disk in drive 2 can be moved to drive 1 if the latter is empty.

ejecting a 5.25" disk

Analogously to CleverPort devices, you can eject a 5.25" disk by clicking on its drive door.

##

5.2 ProDOS or DOS 3.3 Formatted?

Bernie's two most widely used disk formats are DOS-order and ProDOS-order 5.25" disk images. This naming convention is highly confusing because it does not refer to the system software on a disk image but which formatting scheme has been applied for that disk. In order to understand the difference, here're a few comments on 'sector interleaving'.

| A 5.25" disk consists of 16 sectors per track. DOS and ProDOS do not, however, write these sectors sequentially to disk but order them so that the read/write routines of the OS kernel achieve best possible throughput. In other words, each OS assumes an "interleaf factor" - a physical displacement of two logically adjacent sectors - so that the OS has some time for de- or encoding between two sectors. For example, assume the head just flew over sector 1 and the OS read that sector into memory. Next, the OS needs to decode what it just read, and that process takes some time. When the decoding stage is completed, the OS continues reading the disk. Until that happens, about 5 sectors have gone by in the meantime. Hence the OS resumes reading 7 sectors later, and the OS defines interleaving so that the next sector read is actually logical sector 2. If the sectors were ordered strictly logically, there would be quite some overhead - almost one full rotation per sector. With the introduction of interleaving, sectors can be read much more efficiently. Now there're two bad things about this: first, the sectors are numbered only in the order as they appear physically on the disk (i.e. strictly from 0 through 15). Secondly, DOS and ProDOS have different interleaf factors which means that Bernie is unable to locate a sector without knowing which OS did format that disk.

The consequences of the differences in sector interleaving are that you have to decide which formatting scheme has been applied. The emulation world distinguishes between DOS-order images (for disks with DOS 3.3 interleaving) and ProDOS-order images (same for ProDOS). Disk images usually have a file name with a ".DO" or ".PO" suffix.

When opening a 5.25" disk image, Bernie first tries to determine whether it's a ProDOS or a DOS-order image. It then asks you for the formatting scheme and makes its best guess the default choice:

Upon choosing a formatting scheme, Bernie sets the file type of the disk image so it can be recognized the next time automatically. DOS-order images will be given the file type DOS3 while ProDOS-order disk images are of type PDOS.

Tip: if you are unsure about a disk's formatting scheme, choose DOS 3.3. DOS-order disks are much more common than their ProDOS counterparts.

Bernie also supports a third disk image: so-called "nibble" images. Images of that type usually have a ".nib" in their filenames. Images containing nibblized disk data do not require you to know which formatting scheme has been applied because they are a (more or less) 1:1 dump of the original disk. Bernie directly feeds "nibble" images into the emulated hardware, and it's up to the OS to make any sense of it.

##

5.3 Disk Images Recognized by Bernie

Bernie assumes that every file with a generic file type and a file size of exactly 140kB (143,360 bytes) or 227.5kB (232,960 bytes ) is a 5.25" disk image. More precisely, the following file types may be used:

- TEXT, ????, BINA, DSK5: files whose formatting scheme has to be determined manually
- DOS3: disk images that have been formatted with DOS 3.3
- PDOS: disk images that have been formatted with ProDOS
- NIBL: 1:1 disk copy containing disk data in its nibblized form

The DSK5 files originate from "Stop The Madness", an Apple II+ emulator for Macintosh computers. You can use these images directly.

Most disk images ship in either DOS-order or ProDOS-order format. This format is the preferred choice for unprotected software. However, protected software will possibly not work with these formats because they do assume a standardized disk layout.

For protected software, your only choice are nibblized disk images that directly dump the data as it appears "under the drive head" to the disk image file. These images are a bit larger in size because they also record all the bytes needed for synchronizing and positioning the drive head. Nibble images are not a creation of Bernie but are used by other emulators and support has been added for compatibility with existing images. Although the name suggests otherwise, the nibble format does not perfectly mimic a 5.25" floppy disk. (Techies: there is no halftracks support and tracks have fixed length.) Consequently, a disk image format that does not capture 100% of a disk may fail in some situations. If you are only downloading disk images, this is a non-issue because people who have uploaded nibble images have done so because it works for that particular software. You should keep this in your mind only when you're going to make your own copies.

##

5.4 Additional Technical Information

Bernie's current 5.25" hardware emulation features two tweaks, an auto-alining mechanism and a 'turbo' mode for improved throughput. Both features are disabled for nibble disk images.

The auto-aligning mechanism improves head positioning accuracy during write operations. It can't be turned off.

The 'turbo' mode is currently always enabled (except for "nibble" images) and can't be disabled. It improves overall throughput during read operations by as much as 30% average (ballpark) but also introduces odd disk behavior from the viewpoint of the emulated software. We have tested the corresponding code intensively and couldn't find any incompatibilities caused by this tweak. An upcoming release will allow you to turn it off.

5.25" emulation does not use caching.

6. CataDog™ File Browsing

CataDog™ is a stand-alone file cataloging utility integrated into Bernie. It allows you to:

- view the complete catalog of a disk, disk image or shared volume
- view file types and file sizes
- filter catalogs by file type

CataDog is compatible with any ProDOS-formatted disk. It also supports extended GS/OS files. CataDog does not support HFS, DOS 3.3 or MFS formats.

6.1 Cataloging a Disk

CataDog works closely with Bernie's "Disks" window. You select the disk you wish to catalog in the "Disks" window. (To open the "Disks" window, push command-shift-D or open the Window menu and choose "Disks".)

Next, select a single disk by clicking on its drive icon once:

select a disk (image) by clicking it once

Afterwards, open the Window menu and choose "Catalog". This brings up a new window that may look similar to the one below:

The CataDog window displays the following information:

- file name or folder name
- file type as a hexadecimal code or three-letter abbreviation if available
- file size
- total number of files and folders displayed

The window works very much like Mac Finder windows. Directories have a small arrow to the left. Clicking this arrow expands and collapses a directory.

Tip: If you wish to expand an entire file tree (that is, see all files and directories inside a folder), option-click a folder.

Tip: If you wish to resize the window horizontically so you can just see all information, click the window's zoom box.

6.2 Browsing By File Type

CataDog also includes a filter so you only see files of a particular file type. Bernie understands all official three-letter abbreviations (such as AWP, TXT, BIN) and hexadecimal codes.

To activate the type filter, click the "ALL" button in the CataDog status bar. The button is highlighted and shows an ellipsis.

You have now the possibility to:

- enter a three-character abbreviation or
- a hex code.

Let's filter all binary files of type BIN:

Type B, then I, and finally N:

When you enter the last character, Bernie will check the completed code. If it can't find it in its internal database, it will bark and go back to the ellipsis.

If the code could be recognized successfully, the catalog will immediately reflect the new filter setting.

Analogously, if you'd like to specify a file type by its hexadecimal code, you enter a dollar sign plus two hexadecimal digits such as:

To disable the type filter and view all files and folders, click the file type field again.

Registering | Getting Started | Audio/Video | Storage
Communications | Printing | Preferences | Total Integration

Bernie Home | F.E.Systems Home

Mac, Apple IIgs, SmartPort, GS/OS, Finder, MacOS, ProDOS, DOS 3.3, AppleWorks are trademarks of Apple Computer Inc. All other brand names are trademarks of their respective holders.